object to array in php

36

php object to array -

//This works best
$array = json_decode(json_encode($object), true);

php convert array to object -

$object = (object) $array;

Comments

Submit
0 Comments